home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / locale / nsIScriptableDateFormat.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  161 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIScriptableDateFormat.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIScriptableDateFormat_h__
  6. #define __gen_nsIScriptableDateFormat_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. typedef PRInt32 nsDateFormatSelector;
  18.  
  19. enum
  20. {
  21.     kDateFormatNone = 0,            // do not include the date  in the format string
  22.     kDateFormatLong,                // provides the long date format for the given locale
  23.     kDateFormatShort,               // provides the short date format for the given locale
  24.     kDateFormatYearMonth,           // formats using only the year and month 
  25.     kDateFormatWeekday              // week day (e.g. Mon, Tue)
  26. };
  27. typedef PRInt32 nsTimeFormatSelector;
  28.  
  29. enum
  30. {
  31.     kTimeFormatNone = 0,            // don't include the time in the format string
  32.     kTimeFormatSeconds,             // provides the time format with seconds in the  given locale 
  33.     kTimeFormatNoSeconds,           // provides the time format without seconds in the given locale 
  34.     kTimeFormatSecondsForce24Hour,  // forces the time format to use the 24 clock, regardless of the locale conventions
  35.     kTimeFormatNoSecondsForce24Hour // forces the time format to use the 24 clock, regardless of the locale conventions
  36. };
  37. // Define Contractid and CID
  38. // {2EA2E7D0-4095-11d3-9144-006008A6EDF6}
  39. #define NS_SCRIPTABLEDATEFORMAT_CID \
  40. { 0x2ea2e7d0, 0x4095, 0x11d3, { 0x91, 0x44, 0x0, 0x60, 0x8, 0xa6, 0xed, 0xf6 } }
  41. #define NS_SCRIPTABLEDATEFORMAT_CONTRACTID "@mozilla.org/intl/scriptabledateformat;1"
  42. extern NS_IMETHODIMP
  43. NS_NewScriptableDateFormat(nsISupports* aOuter, REFNSIID aIID, void** aResult);
  44.  
  45. /* starting interface:    nsIScriptableDateFormat */
  46. #define NS_ISCRIPTABLEDATEFORMAT_IID_STR "0c89efb0-1aae-11d3-9141-006008a6edf6"
  47.  
  48. #define NS_ISCRIPTABLEDATEFORMAT_IID \
  49.   {0x0c89efb0, 0x1aae, 0x11d3, \
  50.     { 0x91, 0x41, 0x00, 0x60, 0x08, 0xa6, 0xed, 0xf6 }}
  51.  
  52. class NS_NO_VTABLE nsIScriptableDateFormat : public nsISupports {
  53.  public: 
  54.  
  55.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEDATEFORMAT_IID)
  56.  
  57.   enum { dateFormatNone = 0 };
  58.  
  59.   enum { dateFormatLong = 1 };
  60.  
  61.   enum { dateFormatShort = 2 };
  62.  
  63.   enum { dateFormatYearMonth = 3 };
  64.  
  65.   enum { dateFormatWeekday = 4 };
  66.  
  67.   enum { timeFormatNone = 0 };
  68.  
  69.   enum { timeFormatSeconds = 1 };
  70.  
  71.   enum { timeFormatNoSeconds = 2 };
  72.  
  73.   enum { timeFormatSecondsForce24Hour = 3 };
  74.  
  75.   enum { timeFormatNoSecondsForce24Hour = 4 };
  76.  
  77.   /* wstring FormatDateTime (in wstring locale, in long dateFormatSelector, in long timeFormatSelector, in long year, in long month, in long day, in long hour, in long minute, in long second); */
  78.   NS_IMETHOD FormatDateTime(const PRUnichar *locale, PRInt32 dateFormatSelector, PRInt32 timeFormatSelector, PRInt32 year, PRInt32 month, PRInt32 day, PRInt32 hour, PRInt32 minute, PRInt32 second, PRUnichar **_retval) = 0;
  79.  
  80.   /* wstring FormatDate (in wstring locale, in long dateFormatSelector, in long year, in long month, in long day); */
  81.   NS_IMETHOD FormatDate(const PRUnichar *locale, PRInt32 dateFormatSelector, PRInt32 year, PRInt32 month, PRInt32 day, PRUnichar **_retval) = 0;
  82.  
  83.   /* wstring FormatTime (in wstring locale, in long timeFormatSelector, in long hour, in long minute, in long second); */
  84.   NS_IMETHOD FormatTime(const PRUnichar *locale, PRInt32 timeFormatSelector, PRInt32 hour, PRInt32 minute, PRInt32 second, PRUnichar **_retval) = 0;
  85.  
  86. };
  87.  
  88. /* Use this macro when declaring classes that implement this interface. */
  89. #define NS_DECL_NSISCRIPTABLEDATEFORMAT \
  90.   NS_IMETHOD FormatDateTime(const PRUnichar *locale, PRInt32 dateFormatSelector, PRInt32 timeFormatSelector, PRInt32 year, PRInt32 month, PRInt32 day, PRInt32 hour, PRInt32 minute, PRInt32 second, PRUnichar **_retval); \
  91.   NS_IMETHOD FormatDate(const PRUnichar *locale, PRInt32 dateFormatSelector, PRInt32 year, PRInt32 month, PRInt32 day, PRUnichar **_retval); \
  92.   NS_IMETHOD FormatTime(const PRUnichar *locale, PRInt32 timeFormatSelector, PRInt32 hour, PRInt32 minute, PRInt32 second, PRUnichar **_retval); 
  93.  
  94. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  95. #define NS_FORWARD_NSISCRIPTABLEDATEFORMAT(_to) \
  96.   NS_IMETHOD FormatDateTime(const PRUnichar *locale, PRInt32 dateFormatSelector, PRInt32 timeFormatSelector, PRInt32 year, PRInt32 month, PRInt32 day, PRInt32 hour, PRInt32 minute, PRInt32 second, PRUnichar **_retval) { return _to FormatDateTime(locale, dateFormatSelector, timeFormatSelector, year, month, day, hour, minute, second, _retval); } \
  97.   NS_IMETHOD FormatDate(const PRUnichar *locale, PRInt32 dateFormatSelector, PRInt32 year, PRInt32 month, PRInt32 day, PRUnichar **_retval) { return _to FormatDate(locale, dateFormatSelector, year, month, day, _retval); } \
  98.   NS_IMETHOD FormatTime(const PRUnichar *locale, PRInt32 timeFormatSelector, PRInt32 hour, PRInt32 minute, PRInt32 second, PRUnichar **_retval) { return _to FormatTime(locale, timeFormatSelector, hour, minute, second, _retval); } 
  99.  
  100. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  101. #define NS_FORWARD_SAFE_NSISCRIPTABLEDATEFORMAT(_to) \
  102.   NS_IMETHOD FormatDateTime(const PRUnichar *locale, PRInt32 dateFormatSelector, PRInt32 timeFormatSelector, PRInt32 year, PRInt32 month, PRInt32 day, PRInt32 hour, PRInt32 minute, PRInt32 second, PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FormatDateTime(locale, dateFormatSelector, timeFormatSelector, year, month, day, hour, minute, second, _retval); } \
  103.   NS_IMETHOD FormatDate(const PRUnichar *locale, PRInt32 dateFormatSelector, PRInt32 year, PRInt32 month, PRInt32 day, PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FormatDate(locale, dateFormatSelector, year, month, day, _retval); } \
  104.   NS_IMETHOD FormatTime(const PRUnichar *locale, PRInt32 timeFormatSelector, PRInt32 hour, PRInt32 minute, PRInt32 second, PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FormatTime(locale, timeFormatSelector, hour, minute, second, _retval); } 
  105.  
  106. #if 0
  107. /* Use the code below as a template for the implementation class for this interface. */
  108.  
  109. /* Header file */
  110. class nsScriptableDateFormat : public nsIScriptableDateFormat
  111. {
  112. public:
  113.   NS_DECL_ISUPPORTS
  114.   NS_DECL_NSISCRIPTABLEDATEFORMAT
  115.  
  116.   nsScriptableDateFormat();
  117.  
  118. private:
  119.   ~nsScriptableDateFormat();
  120.  
  121. protected:
  122.   /* additional members */
  123. };
  124.  
  125. /* Implementation file */
  126. NS_IMPL_ISUPPORTS1(nsScriptableDateFormat, nsIScriptableDateFormat)
  127.  
  128. nsScriptableDateFormat::nsScriptableDateFormat()
  129. {
  130.   /* member initializers and constructor code */
  131. }
  132.  
  133. nsScriptableDateFormat::~nsScriptableDateFormat()
  134. {
  135.   /* destructor code */
  136. }
  137.  
  138. /* wstring FormatDateTime (in wstring locale, in long dateFormatSelector, in long timeFormatSelector, in long year, in long month, in long day, in long hour, in long minute, in long second); */
  139. NS_IMETHODIMP nsScriptableDateFormat::FormatDateTime(const PRUnichar *locale, PRInt32 dateFormatSelector, PRInt32 timeFormatSelector, PRInt32 year, PRInt32 month, PRInt32 day, PRInt32 hour, PRInt32 minute, PRInt32 second, PRUnichar **_retval)
  140. {
  141.     return NS_ERROR_NOT_IMPLEMENTED;
  142. }
  143.  
  144. /* wstring FormatDate (in wstring locale, in long dateFormatSelector, in long year, in long month, in long day); */
  145. NS_IMETHODIMP nsScriptableDateFormat::FormatDate(const PRUnichar *locale, PRInt32 dateFormatSelector, PRInt32 year, PRInt32 month, PRInt32 day, PRUnichar **_retval)
  146. {
  147.     return NS_ERROR_NOT_IMPLEMENTED;
  148. }
  149.  
  150. /* wstring FormatTime (in wstring locale, in long timeFormatSelector, in long hour, in long minute, in long second); */
  151. NS_IMETHODIMP nsScriptableDateFormat::FormatTime(const PRUnichar *locale, PRInt32 timeFormatSelector, PRInt32 hour, PRInt32 minute, PRInt32 second, PRUnichar **_retval)
  152. {
  153.     return NS_ERROR_NOT_IMPLEMENTED;
  154. }
  155.  
  156. /* End of implementation class template. */
  157. #endif
  158.  
  159.  
  160. #endif /* __gen_nsIScriptableDateFormat_h__ */
  161.